﻿// -----------------------------------------------------------------------
// <copyright file="IO.cs" company="ANGIE.D">
//     Copyright (c) 2012 ANGIE.D. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------

namespace MyFileStore.Helper
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.IO;
    using System.Linq;
    using System.Text;

    public class IO
    {
        public static string GetAppFolderPath()
        {
            FileInfo fileInfo = new FileInfo(Process.GetCurrentProcess().MainModule.FileName);
            return fileInfo.Directory.FullName;
        }

        public static string GetSafePath(string path)
        {
            return Path.Combine(GetAppFolderPath(), path);
        }
    }
}
